package com.example.sonny.dutest;

import com.example.sonny.bean.BookItem;

import java.util.ArrayList;

/**
 * Created by Sonny on 2015/10/11.
 */
public class demoData {
    private ArrayList<BookItem> books;
        BookItem book;
    private int images[] = {R.drawable.t1,R.drawable.t2,R.drawable.t3,R.drawable.t4,R.drawable.t5};
    public void initData(){
        books = new ArrayList<BookItem>();
        for(int i=1;i<=5;i++){
            book = new BookItem();
            book.setName("书名"+i);
            book.setIntro("介绍" + i);
            book.setImgUrl("drawable://" + images[i-1]);
            books.add(book);
        }
    }

    public ArrayList<BookItem> getBooks() {
        return books;
    }
}
